The present invention relates to an encoding apparatus and an encoding method, a decoding apparatus, a decoding method and a decoding program, and is suitable for application to the encoding apparatus and decoding apparatus in compliance with the Joint Photographic Experts Group (JPEG) 2000 standard.
A compression method called the JPEG 2000 standard has been standardized as a new data compression method.
FIG. 1 shows a configuration of an encoding apparatus 1 in compliance with the JPEG 2000 standard, where supplied image data D1 undergoes predetermined input image processing such as a DC level shift process and a color data conversion process in an input image processing portion 2 and then obtained signal processing image data D2 is sent to a Discrete Wavelet Transform (DWT) portion 3.
The DWT portion 3 performs a wavelet transform process to the signal processing image data D2 which is supplied. To be more precise, as shown in FIG. 2, it divides an image based on the signal processing image data D2 into subbands in horizontal and vertical directions, as shown therein for instance, by passing it through two division filters of a low frequency passing type and a high frequency passing type.
FIG. 2 shows the case where the division number is three. In FIG. 2, reference character ‘LL’ denotes a component of the signal processing image data D2 on a low frequency side in both the horizontal and vertical directions, ‘LH’ denotes a component of the signal processing image data D2 on the low frequency side in the horizontal direction and on a high frequency side in the vertical direction, ‘HL’ denotes a component of the signal processing image data D2 on the high frequency side in the horizontal direction and on the low frequency side in the vertical direction, and ‘HH’ denotes a component of the signal processing image data D2 on the high frequency side in both the horizontal and vertical directions respectively.
And the DWT portion 3 sends a wavelet coefficient obtained by such a wavelet transform process to a quantization portion 4 as DWT data D3.
The quantization portion 4 sequentially quantizes the DWT data D3 which is supplied, and cuts obtained quantization coefficients in code blocks of a predetermined size so as to send them to a bit model portion 6 of an Embedded Block Coding with Optimized Truncation (EBCOT) block 5 as code block data D4 in the units of the code blocks.
The bit model portion 6 renders the supplied code block data D4 as a coefficient bit model by using a Coefficient Bit Modeling (CBM) process while scanning the data on each bit plane so as to send data D5 and D6 on symbols and contexts thus obtained to an arithmetic coder portion 7.
The arithmetic coder portion 7 generates an encoding row by performing a predetermined arithmetic coding calculation process with the supplied symbol data D5 and context data D6 as inputs, and sends it to a packetized stream generating portion 8 as encoded data D7.
The packetized stream generating portion 8 packetizes the supplied encoded data D7 in a packet format according to the JPEG 2000 standard. It is thereby possible to obtain encoded packet data D8 meeting a syntax of the JPEG 2000 standard.
FIG. 3 shows the configuration of a decoding apparatus 10 in compliance with the JPEG 2000 standard.
The decoding apparatus 10 extracts encoded data D11 which is an image information portion from encoded packet data D10 meeting the syntax of the JPEG 2000 standard generated as described above so as to send it to an arithmetic decoder portion 13 of an EBCOT block 12.
The arithmetic decoding portion 13 performs a predetermined arithmetic decoding calculation process with the encoded data D11 and context data D12 provided from a bit model portion 14 in a subsequent stage as inputs, and sends symbol data D13 thus obtained to the bit model portion 14.
The bit model portion 14 renders the supplied symbol data D13 as the coefficient bit model by using the CBM process so as to send decoded code block data D14 thus obtained to an inverse quantization portion 15 and send the context obtained at this time to the arithmetic decoder portion 13 as the context data D12.
The inverse quantization portion 15 obtains the wavelet coefficient by performing an inverse quantization process to the supplied decoded quantization data D14, and sends it to an IDWT portion 16 as decoded DWT data D16.
The IDWT portion 16 performs a wavelet inverse transform process to the supplied decoded DWT data D16, and sends wavelet inverse transform image data D16 thus obtained to an input image processing portion 17.
And the input image processing portion 17 performs predetermined signal processing to the wavelet inverse transform image data D16. Thus, it is possible to obtain image data D17 in which the image data D1 (FIG. 1) encoded on the encoding apparatus 1 (FIG. 1) is decoded.
The patent document 1 (Japanese Patent Laid-Open No. 2002-159009) and Non-Patent Document 1 (Japanese Patent Application No. 2003-130793) can be referred to as the documents regarding the encoding apparatus and decoding apparatus in compliance with the JPEG 2000 standard.
As to such encoding and decoding processes according to the JPEG 2000 standard, however, there are problems that processing contents are cumbersome and speeding up is difficult.